package com.whopxx.service.impl;


import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.whopxx.domain.dto.HeroPageDTO;
import com.whopxx.domain.entity.Hero;
import com.whopxx.mapper.HeroMapper;
import com.whopxx.service.HeroService;
import org.springframework.stereotype.Service;

/**
* @author HUAWEI
* @description 针对表【lol_hero(英雄表)】的数据库操作Service实现
* @createDate 2024-07-26 17:51:04
*/
@Service
public class HeroServiceImpl extends ServiceImpl<HeroMapper, Hero>
    implements HeroService {

    @Override
    public Page<Hero> pageQuery(HeroPageDTO dto) {
        Page<Hero> page = this.lambdaQuery()
                .like(StrUtil.isNotBlank(dto.getName()), Hero::getName, dto.getName())
                .page(dto.pageParam());
        return page;
    }
}




